<template>
  <div>
    <el-input v-model="mobile" placeholder="绑定手机号"></el-input>
    <el-button @click="submit">提交</el-button>
  </div>
</template>

<script>
export default {
    data(){
        return{
          mobile:"",
        }
    },
    methods:{
      submit(){
            var data = {'mobile':this.mobile,'uid':this.$route.query.uid,"token":this.$route.query.token}
            this.axios.post('user/bindM',data)
            .then(res=>{
                console.log(res)
                localStorage.setItem('token',res.data.token)
                localStorage.setItem('userid',res.data.userid)
                this.$router.push({'path':'/'})

            })
        }
    }

}
</script>

<style>

</style>